package com.scpii.api.persistence.auth;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.scpii.api.domain.auth.Devices;
import com.scpii.api.domain.auth.UserDevices;

public interface UserDevicesMapper {
	int deleteByPrimaryKey(Long id);

	int insert(UserDevices record);

	int insertSelective(UserDevices record);

	UserDevices selectByPrimaryKey(Long id);

	int updateByPrimaryKeySelective(UserDevices record);

	int updateByPrimaryKey(UserDevices record);

	void updateStatus(UserDevices userDevices);

	/**
	 * @param userDevicesRecord
	 * @return
	 */
	UserDevices selectBySelective(UserDevices userDevicesRecord);
	
	/**
	 * 根据用户ID 来查询该用户在那些设备上进行了登陆,并且为最新用户
	 * @param userId
	 * @return
	 */
	List<Devices> selectLoginOnDevicesByUserId(@Param("userId") Long userId);
}